package com.usefullc.user.param;

import com.usefullc.common.domain.BaseDomain;
import com.usefullc.common.enums.ValidTypeEnum;
import com.usefullc.system.validator.UsefulPropertyVerify;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@ApiModel("用户登录参数")
@Data
public class UserLoginParam extends BaseDomain {

    @UsefulPropertyVerify(minLen = 2,maxLen = 100)
    @ApiModelProperty(notes = "设备号ID",required = true)
    private String deviceId;

    @ApiModelProperty(notes = "登录类型(详见枚举 LoginTypeEnum)",required = true)
    private Integer loginType;

    @ApiModelProperty(notes = "验证码登录类型",required = true)
    private Integer checkCodeType;


    @ApiModelProperty(notes = "账号（邮箱，手机号，用户名）",required = true)
    private String accountNo;

    @ApiModelProperty(notes = "区号")
    private String areaCode;

    @UsefulPropertyVerify(type= ValidTypeEnum.MOBILE)
    @ApiModelProperty(notes = "手机号码")
    private String mobile;

    @ApiModelProperty(notes = "邮箱地址")
    private String email;

    @ApiModelProperty(notes = "密码")
    private String pwd;

    @ApiModelProperty(notes = "OpenId")
    private String openId;

    @UsefulPropertyVerify(required = true,minLen = 4,maxLen = 4)
    @ApiModelProperty(notes = "验证码")
    private String checkCode;


}
